package club.justwill.single.persistence.support;

import java.io.Serializable;

/**
 * Created by xiangnan on 16-1-29.
 */
public class UserActivityPK implements Serializable {
    public UserActivityPK() {}
    private Long userId;
    private Long activityId;

    @Override
    public int hashCode() {
        int result = 17;
        result = 37 * result + (int) (userId ^ (userId >>> 32));
        result = 37 * result + (int) (activityId ^ (activityId >>> 32));
        return result;
    }

    @Override
    public boolean equals(Object o) {
        if (!(o instanceof UserActivityPK))
            return false;
        UserActivityPK unit = (UserActivityPK) o;
        return unit.userId == userId
                && unit.activityId == activityId;
    }

    public Boolean canEqual(Object other) {
        return other instanceof UserActivityPK;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getActivityId() {
        return activityId;
    }

    public void setActivityId(Long activityId) {
        this.activityId = activityId;
    }
}

